﻿using Domain.Entity.Out;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Domain.Entity.search;

namespace Application.Outstock_hService
{
    public interface IOutstock_hService
    {
        //分页查询出库单
        Task<FenYe<Outstock_h>> GetOutstock_h(FenYe<Outstock_h> fenYe, string? code, string? type, int? status, int? whid);

        //高级查询
        Task<FenYe<Outstock_h>> GetAdvancedOutstock_h(FenYe<Outstock_h> fenYe, string? code, string? starttotal, string? endtotal, string? startdate, string? enddate, string? startnum, string? endnum, int? status, string? type, int? whid, string? createname, string? startcreatetime, string? endcreatetime, string? approvername, string? startapprovertime, string? endapprovertime, string? outuser, string? outorder);

        //添加出库单
        Task<int> AddOutstock_h(AddOutstock_hDto addOutstock_HDto);

        //修改单据状态(审核)
        Task<int> UpdateStatus(int outstockid, int status, string approvername, string approvertime);

        //根据id查询出库单
        Task<Outstock_h> GetOutstock_HById(int outstockid);

        //修改出库单
        Task<int> UpdateOutstock_h(UpdateOutstock_hDto updateOutstock_HDto);


        //删除出库单
        Task<int> DeleteOutstock_h(int id);


        //修改单据状态(撤销)
        Task<int> UpdateStatus(int outstockid, int status);

        //根据货品id查询出库记录
        Task<List<Outstock_h>> GetAllOutstock_h(int procid);

        //根据关联单号查询出库记录
        Task<List<Outstock_h>> GetAllOutstock_hByCode(string code);

        //出库统计
        Task<Outstock_hTJResult> Outstock_hTJ(string? timeType, string? code, int? whid, string? instarttime, string? inendtime, string? starttime, string? endtime, string outtype,  int? page, int? pagesize);

        //供应商id查
        Task<FenYe<Outstock_h>> GetOutstock_hSup(FenYe<Outstock_h> fenYe, int sup_id);

        //客户id查
        Task<FenYe<Outstock_h>> GetOutstock_hCust(FenYe<Outstock_h> fenYe, int cust_id);
    }
}
